package com.xxgc.ssm.po;

import java.util.ArrayList;
import java.util.List;

public class CommodityCategoryExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public CommodityCategoryExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andCcIdIsNull() {
            addCriterion("cc_id is null");
            return (Criteria) this;
        }

        public Criteria andCcIdIsNotNull() {
            addCriterion("cc_id is not null");
            return (Criteria) this;
        }

        public Criteria andCcIdEqualTo(Long value) {
            addCriterion("cc_id =", value, "ccId");
            return (Criteria) this;
        }

        public Criteria andCcIdNotEqualTo(Long value) {
            addCriterion("cc_id <>", value, "ccId");
            return (Criteria) this;
        }

        public Criteria andCcIdGreaterThan(Long value) {
            addCriterion("cc_id >", value, "ccId");
            return (Criteria) this;
        }

        public Criteria andCcIdGreaterThanOrEqualTo(Long value) {
            addCriterion("cc_id >=", value, "ccId");
            return (Criteria) this;
        }

        public Criteria andCcIdLessThan(Long value) {
            addCriterion("cc_id <", value, "ccId");
            return (Criteria) this;
        }

        public Criteria andCcIdLessThanOrEqualTo(Long value) {
            addCriterion("cc_id <=", value, "ccId");
            return (Criteria) this;
        }

        public Criteria andCcIdIn(List<Long> values) {
            addCriterion("cc_id in", values, "ccId");
            return (Criteria) this;
        }

        public Criteria andCcIdNotIn(List<Long> values) {
            addCriterion("cc_id not in", values, "ccId");
            return (Criteria) this;
        }

        public Criteria andCcIdBetween(Long value1, Long value2) {
            addCriterion("cc_id between", value1, value2, "ccId");
            return (Criteria) this;
        }

        public Criteria andCcIdNotBetween(Long value1, Long value2) {
            addCriterion("cc_id not between", value1, value2, "ccId");
            return (Criteria) this;
        }

        public Criteria andCcNameIsNull() {
            addCriterion("cc_name is null");
            return (Criteria) this;
        }

        public Criteria andCcNameIsNotNull() {
            addCriterion("cc_name is not null");
            return (Criteria) this;
        }

        public Criteria andCcNameEqualTo(String value) {
            addCriterion("cc_name =", value, "ccName");
            return (Criteria) this;
        }

        public Criteria andCcNameNotEqualTo(String value) {
            addCriterion("cc_name <>", value, "ccName");
            return (Criteria) this;
        }

        public Criteria andCcNameGreaterThan(String value) {
            addCriterion("cc_name >", value, "ccName");
            return (Criteria) this;
        }

        public Criteria andCcNameGreaterThanOrEqualTo(String value) {
            addCriterion("cc_name >=", value, "ccName");
            return (Criteria) this;
        }

        public Criteria andCcNameLessThan(String value) {
            addCriterion("cc_name <", value, "ccName");
            return (Criteria) this;
        }

        public Criteria andCcNameLessThanOrEqualTo(String value) {
            addCriterion("cc_name <=", value, "ccName");
            return (Criteria) this;
        }

        public Criteria andCcNameLike(String value) {
            addCriterion("cc_name like", value, "ccName");
            return (Criteria) this;
        }

        public Criteria andCcNameNotLike(String value) {
            addCriterion("cc_name not like", value, "ccName");
            return (Criteria) this;
        }

        public Criteria andCcNameIn(List<String> values) {
            addCriterion("cc_name in", values, "ccName");
            return (Criteria) this;
        }

        public Criteria andCcNameNotIn(List<String> values) {
            addCriterion("cc_name not in", values, "ccName");
            return (Criteria) this;
        }

        public Criteria andCcNameBetween(String value1, String value2) {
            addCriterion("cc_name between", value1, value2, "ccName");
            return (Criteria) this;
        }

        public Criteria andCcNameNotBetween(String value1, String value2) {
            addCriterion("cc_name not between", value1, value2, "ccName");
            return (Criteria) this;
        }

        public Criteria andCcSortIsNull() {
            addCriterion("cc_sort is null");
            return (Criteria) this;
        }

        public Criteria andCcSortIsNotNull() {
            addCriterion("cc_sort is not null");
            return (Criteria) this;
        }

        public Criteria andCcSortEqualTo(Integer value) {
            addCriterion("cc_sort =", value, "ccSort");
            return (Criteria) this;
        }

        public Criteria andCcSortNotEqualTo(Integer value) {
            addCriterion("cc_sort <>", value, "ccSort");
            return (Criteria) this;
        }

        public Criteria andCcSortGreaterThan(Integer value) {
            addCriterion("cc_sort >", value, "ccSort");
            return (Criteria) this;
        }

        public Criteria andCcSortGreaterThanOrEqualTo(Integer value) {
            addCriterion("cc_sort >=", value, "ccSort");
            return (Criteria) this;
        }

        public Criteria andCcSortLessThan(Integer value) {
            addCriterion("cc_sort <", value, "ccSort");
            return (Criteria) this;
        }

        public Criteria andCcSortLessThanOrEqualTo(Integer value) {
            addCriterion("cc_sort <=", value, "ccSort");
            return (Criteria) this;
        }

        public Criteria andCcSortIn(List<Integer> values) {
            addCriterion("cc_sort in", values, "ccSort");
            return (Criteria) this;
        }

        public Criteria andCcSortNotIn(List<Integer> values) {
            addCriterion("cc_sort not in", values, "ccSort");
            return (Criteria) this;
        }

        public Criteria andCcSortBetween(Integer value1, Integer value2) {
            addCriterion("cc_sort between", value1, value2, "ccSort");
            return (Criteria) this;
        }

        public Criteria andCcSortNotBetween(Integer value1, Integer value2) {
            addCriterion("cc_sort not between", value1, value2, "ccSort");
            return (Criteria) this;
        }

        public Criteria andCcAndBusinessIsNull() {
            addCriterion("cc_and_business is null");
            return (Criteria) this;
        }

        public Criteria andCcAndBusinessIsNotNull() {
            addCriterion("cc_and_business is not null");
            return (Criteria) this;
        }

        public Criteria andCcAndBusinessEqualTo(Integer value) {
            addCriterion("cc_and_business =", value, "ccAndBusiness");
            return (Criteria) this;
        }

        public Criteria andCcAndBusinessNotEqualTo(Integer value) {
            addCriterion("cc_and_business <>", value, "ccAndBusiness");
            return (Criteria) this;
        }

        public Criteria andCcAndBusinessGreaterThan(Integer value) {
            addCriterion("cc_and_business >", value, "ccAndBusiness");
            return (Criteria) this;
        }

        public Criteria andCcAndBusinessGreaterThanOrEqualTo(Integer value) {
            addCriterion("cc_and_business >=", value, "ccAndBusiness");
            return (Criteria) this;
        }

        public Criteria andCcAndBusinessLessThan(Integer value) {
            addCriterion("cc_and_business <", value, "ccAndBusiness");
            return (Criteria) this;
        }

        public Criteria andCcAndBusinessLessThanOrEqualTo(Integer value) {
            addCriterion("cc_and_business <=", value, "ccAndBusiness");
            return (Criteria) this;
        }

        public Criteria andCcAndBusinessIn(List<Integer> values) {
            addCriterion("cc_and_business in", values, "ccAndBusiness");
            return (Criteria) this;
        }

        public Criteria andCcAndBusinessNotIn(List<Integer> values) {
            addCriterion("cc_and_business not in", values, "ccAndBusiness");
            return (Criteria) this;
        }

        public Criteria andCcAndBusinessBetween(Integer value1, Integer value2) {
            addCriterion("cc_and_business between", value1, value2, "ccAndBusiness");
            return (Criteria) this;
        }

        public Criteria andCcAndBusinessNotBetween(Integer value1, Integer value2) {
            addCriterion("cc_and_business not between", value1, value2, "ccAndBusiness");
            return (Criteria) this;
        }

        public Criteria andCcValidIsNull() {
            addCriterion("cc_valid is null");
            return (Criteria) this;
        }

        public Criteria andCcValidIsNotNull() {
            addCriterion("cc_valid is not null");
            return (Criteria) this;
        }

        public Criteria andCcValidEqualTo(String value) {
            addCriterion("cc_valid =", value, "ccValid");
            return (Criteria) this;
        }

        public Criteria andCcValidNotEqualTo(String value) {
            addCriterion("cc_valid <>", value, "ccValid");
            return (Criteria) this;
        }

        public Criteria andCcValidGreaterThan(String value) {
            addCriterion("cc_valid >", value, "ccValid");
            return (Criteria) this;
        }

        public Criteria andCcValidGreaterThanOrEqualTo(String value) {
            addCriterion("cc_valid >=", value, "ccValid");
            return (Criteria) this;
        }

        public Criteria andCcValidLessThan(String value) {
            addCriterion("cc_valid <", value, "ccValid");
            return (Criteria) this;
        }

        public Criteria andCcValidLessThanOrEqualTo(String value) {
            addCriterion("cc_valid <=", value, "ccValid");
            return (Criteria) this;
        }

        public Criteria andCcValidLike(String value) {
            addCriterion("cc_valid like", value, "ccValid");
            return (Criteria) this;
        }

        public Criteria andCcValidNotLike(String value) {
            addCriterion("cc_valid not like", value, "ccValid");
            return (Criteria) this;
        }

        public Criteria andCcValidIn(List<String> values) {
            addCriterion("cc_valid in", values, "ccValid");
            return (Criteria) this;
        }

        public Criteria andCcValidNotIn(List<String> values) {
            addCriterion("cc_valid not in", values, "ccValid");
            return (Criteria) this;
        }

        public Criteria andCcValidBetween(String value1, String value2) {
            addCriterion("cc_valid between", value1, value2, "ccValid");
            return (Criteria) this;
        }

        public Criteria andCcValidNotBetween(String value1, String value2) {
            addCriterion("cc_valid not between", value1, value2, "ccValid");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}